package no.rodland.acc.db;

import org.joda.time.DateTime;
import org.springframework.jdbc.core.RowMapper;

import java.util.List;
import java.util.Map;

import no.rodland.acc.model.AccountGroup;
import no.rodland.acc.model.Bank;
import no.rodland.acc.model.BankAccount;
import no.rodland.acc.model.BankType;
import no.rodland.acc.model.Budget;
import no.rodland.acc.model.BudgetAccount;
import no.rodland.acc.model.BudgetAccountGroup;
import no.rodland.acc.model.TextBudgetAccount;

/**
 * Created by IntelliJ IDEA.
 *
 * @Since: Jun 18, 2010 2:03:50 PM
 * @Author: fmr
 */
public interface FetchService extends DbService {
    Map<Integer, BankAccount> getBankAccounts();

    Map<Integer, AccountGroup> getAccountGroups();

    Map<Integer, BankType> getBankTypes();

    Map<Integer, BudgetAccountGroup> getBudgetAccountGroups();

    Map<Integer, BudgetAccount> getBudgetAccounts();

    Map<Integer, TextBudgetAccount> getTextBudgetAccounts();

    Map<Integer, Bank> getBanks();

    Map<Integer, Bank> getBanks(final DateTime date);

    Bank getNextBank();

    List<Budget> getBudgets(Bank bank);

    <T extends DbRow> T getRowById(DbRow row, int id, RowMapper<T> rowMapper);
}
